package com.example.videoweb.service.impl;

import com.example.videoweb.dao.HistoryMapper;
import com.example.videoweb.domain.History;
import com.example.videoweb.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HistoryServiceImpl implements HistoryService {

    @Autowired
    private HistoryMapper historyMapper;

    @Override
    public boolean insert(History history) {
        return historyMapper.insert(history) > 0;
    }

    @Override
    public boolean update(History history) {
        return historyMapper.update(history) > 0;
    }

    @Override
    public History selectByPrimaryKey(Integer id) {
        return historyMapper.selectByPrimaryKey(id);
    }
}
